import React from 'react';

interface IContractCountContextAPI {
  styleFixCls: string;
  reportByStepRun: (search: Record<string, any>) => void;
  echartsDetailInfo: Record<string, any>;
  stepTypeValue: string;
}

/** 默认上下文 */
const INIT_COUNTCONTEXT_VALUE: IContractCountContextAPI = {
  styleFixCls: '',
  reportByStepRun: () => {},
  echartsDetailInfo: {},
  stepTypeValue: '',
};

const ContractCountContext = React.createContext<IContractCountContextAPI>(INIT_COUNTCONTEXT_VALUE);

interface IContractCountOppositeContextAPI {
  styleFixCls: string;
  reportByStepRun: (search: Record<string, any>) => void;
  echartsDetailInfo: Record<string, any>;
  stepTypeValue: string;
  curRes: Record<string, any>;
}

const INIT_OPPOSITECOURTTEXT_VALUE: IContractCountOppositeContextAPI = {
  styleFixCls: '',
  reportByStepRun: () => {},
  echartsDetailInfo: {},
  stepTypeValue: '',
  curRes: {},
};

const ContractOppositeCountContext = React.createContext<IContractCountOppositeContextAPI>(INIT_OPPOSITECOURTTEXT_VALUE);

export { ContractCountContext, ContractOppositeCountContext };
